The present invention relates to data processing methods, systems, and computer program products, and, more particularly, to data processing methods, systems, and computer program products for tracking ownership of a memory unit(s).
Conventional operating systems, such as the z/OS operating system provided by IBM Corporation, Armonk, N.Y., may use a subsystem to handle communication processing. For example, the z/OS operating system includes a subsystem called the Communications Server (CS), which includes a storage manager subsystem called the Common Storage Manager (CSM) for use by Systems Network Architecture (SNA) and/or TCP/IP protocol stacks to perform input/output (I/O) operations.
One purpose of the CSM is to reduce or avoid data moves within the operating system image while performing I/O operations. For example, during large data operations, such as file transfers, instead of copying data buffers, the same buffers or storage may be shared by various subsystems and/or components within subsystems. The various subsystems/components may pass tokens to represent current ownership of the storage.
To facilitate sharing of storage, a concept referred to as “Change Owner” may be used. When a “Change Owner” is executed for a buffer, the responsibility for the storage is passed to a different owner or subsystem. The owner may be, for example, the operating system task or job (address space). An address space or task is a general operating system term used to denote an application, job, program, and/or thread (i.e., any unit of work in an Operating System). If the responsible owner, task, or address space were to terminate abnormally or unexpectedly, then the CSM may free the storage automatically.
This memory-sharing model may be extended to multiple concurrent owners through a concept of primary and image buffers. The storage is not released back to the CSM or the operating system until all users release their ownership, i.e., the primary buffer and the image buffer are both freed. An image buffer may be created from a primary buffer using an “assign buffer” function. Once this function is executed, there are two logical representations for the same storage. A first user may use the primary buffer and a second user may use the image buffer.
The CSM may facilitate sharing and access to buffers through a token. That is, the buffers may be obtained, the buffers may be assigned, the buffers may be freed, the owners may be changed, etc. using the CSM token. Unfortunately, while the CSM may reduce the number of data moves, the relatively complex storage sharing design may make it difficult for an operating system administrator to monitor and evaluate how much storage is being used and what subsystem or software entity is using the storage. Due to the high bandwidth provided by modern technology, it is generally desirable to manage and understand how storage is being used to provide the proper system resources. Unfortunately, it may be difficult for an operating system administrator to determine which jobs or tasks are actually using the CSM storage, determine if CSM is associated with a specific system resource (e.g., I/O device), determine if CSM storage is validly or invalidity growing, plan for and allocate CSM storage, and monitor and track CSM usage with sufficient granularity and understanding.
Another problem that operating system administrators may face is diagnosing a storage growth scenario. Storage may grow excessively due to “lost” buffers when a CSM token representing shared buffers is mismanaged. “Lost” storage or buffers refers to memory that was never freed at all or was not freed the required number of times based on the number of concurrent owners it may have. Storage or buffers may also be lost due to logic errors. Errors that result in “lost” storage may occur very slowly (over a period of days) or may occur very quickly (within microseconds). The errors may result in a complete system outage when the storage growth is excessive. Unfortunately, when these types of errors occur, it may be difficult for an operating system administrator to determine what subsystem or component was last responsible for freeing the storage. Oftentimes only the task or address space ownership is known, which may not provide helpful information.